package com.ask.apiLake;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/mine")
public class MyController {
    @GetMapping("/get")
    public ResponseEntity<String> getRequest(@RequestParam String param) {
        System.out.println("param: " + param);
        return ResponseEntity.ok(param);
    }

    @PostMapping
    public ResponseEntity<String> postRequest(@RequestBody Map<String, String> body) {
        System.out.println(body);
        return ResponseEntity.ok("Received POST request with body: " + body);
    }


}
